Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump typescript to v4.7 #12901

Merged
merged 5 commits into from
Jun 3, 2022
Merged

chore: bump typescript to v4.7 #12901

merged 5 commits into from
Jun 3, 2022

Conversation

mrazauskas
Copy link
Contributor

@mrazauskas mrazauskas commented Jun 2, 2022

Closes #12877

Summary

This should fix TypeScript upgrade issue. Interesting thing was caught by TS. For example, this:

jest.spyOn({}, 'ups');

Will throw: "Error: Cannot spy the ups property because it is not a function".

But here:

jest.spyOn({}, Symbol('ups'));

It throws: "TypeError: Cannot convert a Symbol value to a string". This is what TS was suggesting to fix. After this fix, the error message becomes: "Error: Cannot spy the Symbol(ups) property because it is not a function". Much better.


Also I spend some time trying out if jest.spyOn accepts keys as symbols. It does, all works. Only error messages is the issue. Would be nice to have tests for these, of course. Started working, refactoring some details and here I got stuck ;D Wait.. But that is another story already. Better I will make separate PR later.

Test plan

Green CI.

@SimenB
Copy link
Member

SimenB commented Jun 2, 2022

need to update some lockfiles

@SimenB SimenB merged commit 3e38157 into jestjs:main Jun 3, 2022
@mrazauskas mrazauskas deleted the chore-ts4.7 branch June 3, 2022 05:32
@github-actions
Copy link

github-actions bot commented Jul 4, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants